import HTTP from '../../../utils/http.js';
import { API, API_GENERATE } from '../../../config/api.js';
class MessageService {
	//消息未读列表
	unreadList (sendData = {}) {
		return HTTP.GET(API_GENERATE(API.INFO_MESSAGELIST), sendData);
	}
	//消息列表
	getListData (sendData = {}) {
		return HTTP.POST(API_GENERATE(API.INFO_LIST), sendData);
	}
	//删除消息
	deleteMessage (sendData = {}) {
		return HTTP.POST(API_GENERATE(API.INFO_DELETE), sendData)
	}
	//消息详情
	detailsMessage (sendData = {}) {
		return HTTP.GET(API_GENERATE(API.INFO_DETAILS), sendData);
	}
	//消息已读
	readMessage (sendData = {}) {
		return HTTP.GET(API_GENERATE(API.INFO_ISREAD), sendData)
	}
	//全部消息已读
	readMessageAll (sendData = {}) {
		return HTTP.POST(API_GENERATE(API.INFO_ISREAD_ALL), sendData)
	}
}
module.exports = new MessageService();